home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3611 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  34 lines

  1. Path: news.mcgill.ca!news
  2. From: Jean-Philippe C⌠tΘ <jcote1@PO-Box.McGill.CA>
  3. Newsgroups: comp.lang.c
  4. Subject: Problem with arrays
  5. Date: 30 Jan 1996 01:51:06 GMT
  6. Organization: McGill University Computing Centre
  7. Message-ID: <4ejtia$6id@sifon.cc.mcgill.ca>
  8. NNTP-Posting-Host: o-06.das.mcgill.ca
  9. X-Newsreader: SPRY News 3.03 (SPRY, Inc.)
  10.  
  11.  
  12. Hello everyone,
  13.  
  14.     I'm currently writing a program using tries to store words. For bulding my trie, I have defined the following struct:
  15.  
  16. typedef struct nodebox NODEBOX, *TRIE
  17.  
  18. struct nodebox{
  19. {    int letters[100];
  20.     TRIE subtree[100];
  21. };
  22.  
  23. Then, I declare variables as tries in certain functions. But here's the problem: before inserting any letter in the trie, I expect the
  24.  
  25. elements in the array letters to be all zeros( '\0' ) like in a normal empty array. But instead, the elements of this arrays are weird 
  26.  
  27. numbers like 25678. It bothers me since I assume that they are '\0' in my insert function. I really don't know what's going wrong.
  28.  
  29. If you have any idea or solutions, I'd be very graceful if you could e-mail me; I'm stuck.
  30.  
  31. Thanks a lot.
  32.  
  33.     jcote1@po-box.mcgill.ca
  34.